package stmlib;

public class Lockable {
    protected LockManager lm;
    //final public void commit() { lm.commit(); }
    //final public void rollback() { lm.rollback(); }
    public Lockable lock() { lm.writeLock(); return this; }
    protected String toString(Object o) { 
        try { lm.readLock(); }
        catch (Exceptions.NotInTransaction e) { }
        return o.toString();
    }
}